package com.fire.control.system.module.demo.controller.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fire.control.system.module.common.controller.BaseController;
import com.fire.control.system.module.demo.service.impl.DemoService;
import com.fire.control.system.support.protocol.comman.DemoRequest;
import com.fire.control.system.support.protocol.comman.ResponseProtocol;

@RestController
@RequestMapping("web/demo")
public class DemoController extends BaseController{

	@Autowired DemoService demoService;
	
	@RequestMapping
	public ResponseProtocol test(DemoRequest req){
		System.out.println("当前用户ID:"+getUser().getUserId());
		return demoService.getAll(req);
	}
	
	@RequestMapping("a")
	public ResponseProtocol a(DemoRequest req){
		return demoService.getAll(req);
	}
	
}
